package org.pp.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.pp.entity.PpOrder;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Setter
@Getter
public class MiniappOrderVo {

    @Schema(description = "订单id")
    @TableId(value = "order_id", type = IdType.AUTO)
    private Long orderId;


    @Schema(description = "商品名称，冗余，用于搜索")
    private String names;

    @Schema(description = "条目信息")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private PpOrder.ItemInfo[] itemInfo;

    @Schema(description = "商品总价")
    private BigDecimal goodsPrice;

    @Schema(description = "邮费")
    private BigDecimal postage;

    @Schema(description = "支付金额")
    private BigDecimal payPrice;


    @Schema(description = "订单号")
    private String orderNo;

    @Schema(description = "商品数")
    private Integer amount;

    @Schema(description = "订单状态 -1已取消 0 待支付 1待发货 2待收货 3待评价 4已评价")
    private Integer status;

}
